#include <iostream>
using namespace std;
int a[10]={0};
int main() {
    int n;
    cin >> n;
    int sum=0;
    while(n)
    {
        int g=n%10;
        if(!a[g]){
            sum=sum*10+g;
            a[g]=1;
        }
        n/=10;
    }
    cout << sum;
    return 0;
}